Skip to content

Upgrade WebdriverIO e2e stack from v8 to v9#1930

Merged
rugpanov merged 4 commits into
mainfrom
feature/wdio-v9-upgrade
Jul 2, 2026
Merged

Upgrade WebdriverIO e2e stack from v8 to v9#1930
rugpanov merged 4 commits into
mainfrom
feature/wdio-v9-upgrade

Conversation

@rugpanov

Copy link
Copy Markdown
Contributor

Why

Dependabot raised four separate, interdependent bumps for the WebdriverIO v8→v9 migration that cannot merge individually:

The @wdio/* packages must move in lockstep, and the v9 line additionally requires wdio-vscode-service v8 (its v8 peer-depends on webdriverio@^9) — which Dependabot never proposed. This PR performs the coordinated upgrade so the e2e tooling can advance, and supersedes the four PRs above.

What

  • Bump @wdio/cli, @wdio/local-runner, @wdio/mocha-framework, @wdio/spec-reporter, @wdio/types^9.29.0; wdio-video-reporter^6.2.0; wdio-vscode-service^8.0.0.
  • wdio.conf.ts: type the config as WebdriverIO.Config (v9 moved capabilities out of Options.Testrunner) and drop the removed autoCompileOpts/ts-node block. v9 transpiles TS via the bundled tsx; the tsconfig is now passed with --tsConfigPath in the test:integ:extension script.
  • e2e tsconfig.json: add the DOM lib and skipLibCheck, now required by v9's webdriverio types.
  • commonUtils.ts: expect(string).not.toHaveText() is element-only in v9's expect-webdriverio; switched the string assertion to .not.toBe("-").

Verification

  • tsc --noEmit -p src/test/e2e/tsconfig.json passes (0 errors)
  • eslint + prettier -c clean on changed files
  • yarn install resolves cleanly to webdriverio 9.29.0 with no peer conflicts
  • yarn run build succeeds
  • The e2e suite itself runs in CI (needs a VS Code download, VSIX build and a live Databricks workspace).

Backward compatibility: dev/test-tooling only — no runtime, API, persisted-state or config-format changes; the shipped extension is unaffected.

This pull request and its description were written by Isaac.

*Why*
Dependabot raised four separate, interdependent bumps for the WebdriverIO
v8→v9 migration (@wdio/cli #1787, @wdio/mocha-framework #1788, @wdio/types
#1789, wdio-video-reporter #1785). None can merge individually because the
@wdio/* packages must move in lockstep and the v9 line additionally requires
wdio-vscode-service v8 (its v8 peer-depends on webdriverio@^9). This single
PR performs the coordinated upgrade so the e2e tooling can advance.

*What*
- Bump @wdio/cli, @wdio/local-runner, @wdio/mocha-framework, @wdio/spec-reporter
  and @wdio/types to ^9.29.0; wdio-video-reporter to ^6.2.0; and
  wdio-vscode-service to ^8.0.0 (required for webdriverio@^9).
- wdio.conf.ts: type the config as WebdriverIO.Config (v9 moved `capabilities`
  out of Options.Testrunner) and remove the removed `autoCompileOpts`/ts-node
  block. v9 transpiles TS via the bundled `tsx`; the tsconfig is now passed
  with `--tsConfigPath` in the `test:integ:extension` script.
- e2e tsconfig: add the DOM lib and skipLibCheck, which v9's webdriverio types
  now require.
- commonUtils.ts: `expect(string).not.toHaveText()` is element-only in v9's
  expect-webdriverio; switch the string assertion to `.not.toBe("-")`.

*Verification*
- `tsc --noEmit -p src/test/e2e/tsconfig.json` passes (0 errors).
- `eslint` + `prettier -c` clean on changed files.
- `yarn install` resolves cleanly to webdriverio 9.29.0 with no peer conflicts.
- `yarn run build` succeeds.
- Note: the e2e suite itself runs only in CI (needs a VS Code download, VSIX
  build and a live Databricks workspace), so the runtime e2e run is left to CI.

Backward compatibility: dev/test-tooling only — no runtime, API, persisted
state or config-format changes; the shipped extension is unaffected.

Co-authored-by: Isaac
@rugpanov

Copy link
Copy Markdown
Contributor Author

@rugpanov rugpanov marked this pull request as draft June 30, 2026 18:00
*Why*
After the v8->v9 upgrade every e2e spec failed in CI with `Can't find view
control "CONFIGURATION"`. Root cause (from the eng-dev-ecosystem integration
run): WebdriverIO v9 loads TypeScript by injecting `--import <tsx loader>` into
NODE_OPTIONS. wdio-vscode-service installs the Databricks extension by spawning
the VS Code (Electron) `code` CLI, which inherits NODE_OPTIONS, and Electron
hard-rejects `--import` there ("Code.exe: --import is not allowed in
NODE_OPTIONS"). The extension never installs, so its sidebar view is absent and
all specs fail.

*What*
- In wdio.conf.ts, strip `--import <loader>` from process.env.NODE_OPTIONS, but
  only in worker processes (WDIO_WORKER_ID set). tsx has already registered its
  loader in-process by the time the config module loads, so in-process spec
  transpilation is unaffected; only child processes (the `code`/`databricks`
  CLIs) stop inheriting the rejected flag. The launcher keeps NODE_OPTIONS
  intact so the workers it spawns still receive tsx.

*Verification*
- `tsc --noEmit -p src/test/e2e/tsconfig.json` passes; eslint + prettier clean.
- Full e2e validation is delegated to the eng-dev-ecosystem integration run on CI
  (cannot run the VS Code e2e suite locally).

Backward compatibility: dev/test-tooling only; no runtime/API/state/format change.

Co-authored-by: Isaac
@rugpanov rugpanov temporarily deployed to test-trigger-is June 30, 2026 18:04 — with GitHub Actions Inactive
@rugpanov rugpanov marked this pull request as ready for review June 30, 2026 18:04
@rugpanov

rugpanov commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Integration test validation (wdio v9)

The e2e suite runs in databricks-eng/eng-dev-ecosystem (vscode-isolated-pr). Because the Trigger Tests job is currently infra-blocked (App-token step hits the org IP allow list — the issue #1883 addresses), I dispatched the workflow manually for this PR's HEAD (14a7c5d).

Result: the v9 upgrade works. The systemic regression is fixed and the remaining failures are pre-existing suite flakiness, not caused by this PR.

Before the NODE_OPTIONS fix

Every e2e shard failed identically with Can't find view control "CONFIGURATION" — wdio v9 injects --import <tsx> into NODE_OPTIONS, which the VS Code Electron binary (spawned by wdio-vscode-service to install the extension) rejects: Code.exe: --import is not allowed in NODE_OPTIONS. The extension never activated. Fixed by stripping --import from NODE_OPTIONS in worker processes only (commit 14a7c5d).

After the fix (manual run 28502968166)

  • 9 shards fully green; VS Code launches and the Databricks extension activates.
  • Zero CONFIGURATION/activation failures remain.
  • Remaining red shards fail on pre-existing environmental flakes: Webview did not open, Bundle deployed successfully deploy timing, Failed to query available provider packages (network), element click intercepted, VS Code binary download ECONNRESET.

Baseline comparison (proves these are pre-existing)

The most recent prior run on main (28439567139, commit 1a8446b, still on wdio v8) shows 19 failed / 13 passed with the identical failure modes (Webview did not open, element click intercepted, deployed successfully). This suite is chronically red independent of this change; every vscode-isolated-pr run for the past 2+ weeks is completed/failure.

Local verification also clean: tsc --noEmit (e2e tsconfig), eslint, prettier -c, yarn install --immutable, and yarn build all pass.

@rugpanov

rugpanov commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

@rugpanov rugpanov requested a review from misha-db July 1, 2026 09:09
@misha-db

misha-db commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

All e2e tests seems to be failing (except SDK tests), https://github.com/databricks-eng/eng-dev-ecosystem/actions/runs/28456302366

Current e2e tests are run on node 18 with engine "vscode": "^1.86.0"
are new versions compabile with this setup?

@misha-db misha-db left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e2e tests failing

@rugpanov

rugpanov commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

@misha-db I ran a controlled side-by-side to settle whether the failures are from this PR or pre-existing. Both dispatched back-to-back on the same runners:

Run Branch wdio e2e result
28526881382 main v8 (current) 12 pass / 20 fail
28526884158 this PR v9 + fix 10 pass / 22 fail

The failing-spec sets are identical

Every spec that fails on this PR also fails on main today (on both linux and windows):

bundle_init, bundle_variables, deploy_and_run_job, deploy_and_run_pipeline, destroy, refresh_resource_explorer_on_yml_change, run_files, run_notebooks_ipynb, run_notebooks_py, unity_catalog, run_dbconnect, run_serverless_workflow.

Same failure modes on both branches — all environmental/network, none v9-related:

  • Failed to query available provider packages (terraform registry network)
  • Bundle deployed successfully deploy-timing / Webview did not open
  • element click intercepted, Item 'Jobs' not found, serverless-compute timeouts

Zero activation regressions

Can't find view control "CONFIGURATION" count = 0 on every failing shard of the PR run. That was the only v9-introduced failure (the NODE_OPTIONS --import issue), and it's fixed in 14a7c5d. The small pass-count delta (12 vs 10) is within this suite's run-to-run flake noise — the set of failing specs matches.

Compatibility recap (node 18 / vscode ^1.86.0)

All v9 packages require node >= 18.20.0; CI runs 18.20.8 (no EBADENGINE warnings). wdio-vscode-service@8 downloaded and drove VS Code 1.86.0 successfully. No engines change in this PR.

Net: the v8→v9 upgrade doesn't introduce any e2e regression — it inherits the suite's existing (pre-existing, unrelated) flakiness. Happy to rebase or adjust if you'd prefer, but I don't think the red shards here are attributable to this change.

@rugpanov

rugpanov commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Update — a workspace-side fix (clearing the .bundle folder that had hit its 10000-file size limit: Size limit exceeded for folder '/Users/.../.bundle') recovered the whole deploy family. Fresh run 28535316753 on this PR:

19 passing / 13 failing (was 10/22 before the fix).

Now passing (both linux + windows): deploy_and_run_job, deploy_and_run_pipeline, destroy, auth, bundle_init, bundle_sub_folder, sync, wsfs_explorer, run_dbconnect, refresh_resource_explorer_on_yml_change — i.e. the whole deploy/bundle path works on wdio v9.

The remaining reds are one environmental cause — the CI runner can't reach the Terraform registry:

Error: terraform init: exit status 1
Failed to query available provider packages
databricks/databricks: could not connect to registry.terraform.io:
  ... "https://registry.terraform.io/.well-known/terraform.json": EOF

That accounts for run_files, run_notebooks_ipynb, run_notebooks_py, run_serverless_workflow, unity_catalog (all Failed to query available provider packages), plus one element click intercepted flake. Nothing wdio-related, and Can't find view control "CONFIGURATION" count is still 0 across every shard.

So: the v9 upgrade itself is clean — the deploy failures were the workspace size limit, and the rest is the runner's network reach to registry.terraform.io. Neither is caused by this PR.

const startTime = await browser.getTextByLabel("run-start-time");
console.log("Run start time:", startTime);
expect(startTime).not.toHaveText("-");
expect(startTime).not.toBe("-");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*Why*
Review feedback on #1930 flagged that `waitForWorkflowWebview` fails at the
run-start-time check on slower (e.g. serverless) runs: `Run start time: -` ->
`expect(received).not.toBe(expected)`. Investigation showed the original
`expect(startTime).not.toHaveText("-")` was a no-op — `toHaveText` is an
expect-webdriverio *element* matcher and `startTime` is a plain string
(getTextByLabel returns `elem.getText()`), so it never asserted anything and
"-" always slipped through. The v9 tsconfig surfaced this (element matcher on a
string), and my interim `.not.toBe("-")` turned it into a correct but *instant*
assertion — which flakes because the webview renders "-" as a placeholder until
the run details arrive.

*What*
- Replace the single-shot assertion with a `browser.waitUntil` that polls
  `run-start-time` until it is populated (not "-", non-empty), matching the
  surrounding waitUntil pattern (60s timeout, 1s interval). This asserts the
  original intent — start time eventually populates — without racing the
  placeholder.

*Verification*
- `tsc --noEmit -p src/test/e2e/tsconfig.json` passes; eslint + prettier clean.
- Behavior validated on CI: this addresses the run-start-time failure seen in
  eng-dev-ecosystem run 28535316753 (serverless spec).

Backward compatibility: e2e test-only; no runtime/API/state/format change.

Co-authored-by: Isaac
@rugpanov rugpanov temporarily deployed to test-trigger-is July 2, 2026 08:58 — with GitHub Actions Inactive
@rugpanov

rugpanov commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

@rugpanov rugpanov temporarily deployed to test-trigger-is July 2, 2026 11:42 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/vscode

Inputs:

  • PR number: 1930
  • Commit SHA: 9063d81398cea41d363a861d02abe4f3e906f788

Checks will be approved automatically on success.

@rugpanov rugpanov merged commit a2d9269 into main Jul 2, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants